#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
using namespace std;


void PrintMatrix(vector<vector<char> >& matrix)
{
	for (int i = 0;i<matrix.size();i++)
	{
		for (int j = 0;j<matrix[i].size();j++)
		{
			cout << "   " << matrix[i][j];
			//if (j < matrix[i].size() - 1)
			//	cout << "   ";
		}
		cout << endl;
	}
}
char GetTheChar(char startChar,int count)
{
	char tmp = startChar + (count % 26);
	if (tmp > 'Z')
	{
		tmp = (tmp - 'A') % 26 + 'A';
	}

	return tmp;
}

void FillChar(int x,int y,char startChar,int row,int col,vector<vector<char> >& matrix)
{
	if (row == 0 || col == 0)
	{
		return;
	}

	if (row == 1)
	{
		for (int c = x;c < x + col;c++)
		{
			matrix[y][c] = GetTheChar(startChar,c - x);
		}
		return;
	}

	if (col == 1)
	{
		for (int r = y;r < y + row;r++)
		{
			matrix[r][x] = GetTheChar(startChar,r - y);
		}
		return;
	}

	int count = 0;
	for (int c = x;c < x + col;c++)
	{
		matrix[y][c] = GetTheChar(startChar,count++);
	}
	for (int r = y + 1;r < y + row - 1;r++)
	{
		matrix[r][x + col - 1] = GetTheChar(startChar,count++);
	}
	for (int c = x + col - 1;c >= x ;c--)
	{
		matrix[y + row - 1][c] = GetTheChar(startChar,count++);
	}
	for (int r = y + row -2 ;r >= y + 1;r--)
	{
		matrix[r][x] = GetTheChar(startChar,count++);
	}

	int nextChar = GetTheChar(startChar,count);
	FillChar(x + 1,y + 1,nextChar,row - 2,col - 2,matrix);


}

int main3752()
{
	int M,N;
	cin >> M >> N;

	vector<vector<char> > matrix;
	matrix.resize(M);
	for (int i = 0;i<M;i++)
	{
		matrix[i].resize(N);
	}
	FillChar(0,0,'A',M,N,matrix);
	PrintMatrix(matrix);
	return 0;
}